package com.novax.ex.activity.provider.service;

import com.novax.ex.activity.infrastructure.entity.RankApply;
import com.novax.ex.activity.infrastructure.entity.RankApplyUser;
import com.novax.ex.activity.infrastructure.mapper.RankApplyMapper;
import com.novax.ex.common.base.BaseMapper;
import com.novax.ex.common.base.BaseService;
import org.springframework.stereotype.Service;

import jakarta.annotation.Resource;
import java.util.List;

/**
 * @Description
 * @Author ChenXi
 * @Date 2023/11/27/14:24
 */
 

@Service
public class RankApplyService extends BaseService {

    @Resource
    private RankApplyMapper rankApplyMapper;

    @Override
    protected BaseMapper getBaseMapper() {
        return rankApplyMapper;
    }

    /**
     * @Description: 查询是否已报名
     * @Author: ChenXi
     * @Date:  2023/11/27 14:44
     * @param userId
     * @param rankId
     * @return: java.lang.String
     **/
    public RankApply queryApply(Long userId, Long rankId) {
       return rankApplyMapper.queryApply(userId, rankId);
    }

    /**
     * @Description: 查询报名用户id page
     * @Author: ChenXi
     * @Date:  2023/12/13 19:12
     * @param rankId
     * @return: java.util.List<java.lang.Long>
     **/
    public List<RankApplyUser> queryApplyUserIdList(Long rankId) {
        return rankApplyMapper.queryApplyUserIdList(rankId);
    }

}
